package com.zpark.dao;

import com.zpark.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {
    User selectUserByNameAndPassword(@Param("name")String name,@Param("password")String password);
    User selectUserById(@Param("id")Integer id);
    List<User> selectUserByPage(@Param("offset")Integer offset,@Param("limit")Integer limit,@Param("column")String column,@Param("value")Object value);
    List<User> selectUserByIds(@Param("ids")Integer[] ids);
    List<User> selectAllUser();
    int selectUserCount(@Param("column")String column,@Param("value")String value);
    int selectCountBySex(@Param("value")Integer value);
    void insertUser(User user);
    void insertAllUser(@Param("users")List<User> users);
    void updateUser(User user);
    void deleteUserById(@Param("id")Integer id);
    void deleteUserByIds(@Param("ids")Integer[] ids);
}
